﻿<%@ Page Language="VB" %>
<script runat="server">

    Sub Page_Load(Sender As Object, E As EventArgs)
    
        If (Request.IsAuthenticated = true) Then
            Status.Text = "Usuário " & User.Identity.Name & " está conectado."
        End If
    
    End Sub
    
    Sub LogOffBtn_Click(Sender As Object, E As EventArgs)
        FormsAuthentication.SignOut()
        Response.Redirect("logo.aspx")
    
    End Sub
    
    Sub Button1_Click(sender As Object, e As EventArgs)
        Response.Redirect("logo.aspx")
    End Sub

</script>
<html>
<head>
</head>
<body style="FONT-FAMILY: arial">
    <form id="Form1" runat="server">
        <table bordercolor="navajowhite" cellspacing="0" cellpadding="2" width="950" align="center" bgcolor="floralwhite">
            <tbody>
                <tr>
                    <td valign="center" align="middle" bgcolor="#ffdead" colspan="2">
                        <h2>Logout
                        </h2>
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="middle">
                        <asp:Label id="Status" runat="server" forecolor="red"></asp:Label>
                        <br />
                        <br />
                        <table cellpadding="10" border="0">
                            <tbody>
                                <tr>
                                    <td colspan="2">
                                        Deseja sair?
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <asp:Button id="Button2" onclick="Button1_Click" runat="server" Text="Não"></asp:Button>
                                    </td>
                                    <td align="right">
                                        <asp:button id="Button3" onclick="LogOffBtn_Click" runat="server" text="Sim"></asp:button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</body>
</html>
